export let JsonTojs = function(datalist,filename){
    let allstr=""
    datalist.forEach(element => {
        let str = `export let ${element.name} = ${JSON.stringify(element.data)} \n`;
        allstr = allstr +str
    });
    const file = new Blob([allstr]);
    const a= document.createElement("a");
    const url = URL.createObjectURL(file)
    a.href = url;
    a.download = `${filename}.js`
    document.body.appendChild(a)
    a.click();
    document.body.removeChild(a);
    URL.revokeObjectURL(url);
}